package com.ym.b2b.tk.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.ym.b2b.commons.conf.B2BConstants;
import com.ym.b2b.commons.controller.BaseController;

@Controller
public class IndexController extends BaseController {

    @RequestMapping("showIndex.s")	
    public ModelAndView showIndex() {
        ModelAndView m = new ModelAndView();
        try {
            // 分类
            // Result ret = indexService.showIndex();

            // 推荐产品
            // Page<EmBProduct> p = productDao.searchPageProduct(new EmBProduct(), new Page<EmBProduct>());

            // ret.putData("productList", p.getRows());
            // m.addObject("result", ret);
            m.setViewName("index");

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            m.setViewName(B2BConstants.WEB_ERROR);
        }
        return m;
    }
}
